package com.zhou.www;

import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {
    public static void main(String[] args) {
        List<OCRInfo> date = new ArrayList<>();
        OCRRpc o = new OCRRpc();
        String ocrInfos = o.toOcr("http://192.168.0.99:8089/api/tr-run/", new File("D:\\临时文件\\11\\研发\\四川\\OCR\\5月12日杆体照片\\41000121.jpg"));
        String pattern ;
        Pattern r;
        Matcher m;
        String result;

         pattern = "(时间)(.*?)(经度)";
         r = Pattern.compile(pattern);
         m = r.matcher(ocrInfos);
         result = m.find() ? m.group(2) : "";
        System.err.println("时间："+result);

         pattern = "(经度)(.*?)(纬度)";
         r = Pattern.compile(pattern);
         m = r.matcher(ocrInfos);
        result = m.find() ? m.group(2) : "";

        pattern = "(纬度)(.*?)(地点)";
        r = Pattern.compile(pattern);
        m = r.matcher(ocrInfos);
        result = m.find() ? m.group(2) : "";

        pattern = "(地点)(.*)";
        r = Pattern.compile(pattern);
        m = r.matcher(ocrInfos);
        result = m.find() ? m.group(2) : "";


;
    }
}
